package core;

import dbms.DBCheckAndConfigurationFunctions;
import dbms.DBTables;

public class Configuration {

	// TODO: creare un file temp per vedere se la cartella è scrivibile
	
	public static boolean isConfigured()
	{
		if(!DBCheckAndConfigurationFunctions.isDBConfigured()) return false;
		
		return true;
	}
	
	public static boolean createDB()
	{
		return DBTables.createDB();
	}
	
	public static boolean setServerUser(String userName, String password)
	{
		return DBCheckAndConfigurationFunctions.setServerUser(userName, password);
	}
	
	public static boolean setServerMainPath(String path)
	{
		return DBCheckAndConfigurationFunctions.setServerMainPath(path);
	}
	
	public static boolean setServerTempDir(String tempDir)
	{
		return DBCheckAndConfigurationFunctions.setServerTempDir(tempDir);
	}
	
	public static boolean setServerConnectionPort(int port)
	{
		return DBCheckAndConfigurationFunctions.setServerConnectionPort(port);
	}
	
	public static boolean setFileTransferConfigurationPort(int port)
	{
		return DBCheckAndConfigurationFunctions.setFileTransferConnectionPort(port);
	}
}
